package com.kgc.chen.day01;

import java.util.Scanner;

public class erWin {
    public static void main(String[] args) {
        Scanner intput=new Scanner(System.in);
        System.out.println("请输入有几个班");
        int a=intput.nextInt();

        System.out.println("请输入这个班有几个人");
        int b=intput.nextInt();

        int [][]scores=new int[a][b];
        int sum=0;
        double avg=0;
        for (int i=0;i<scores.length;i++){
            for (int j=0;j<scores[i].length;j++){
                System.out.println("请输入第"+(i+1)+"个班级第"+(j+1)+"个同学的成绩:");
                scores[i][j]=intput.nextInt();
            }
        }
        for (int i=0;i<scores.length;i++){
            sum=0;
            System.out.println("第"+(i+1)+"个班总成绩");
            for (int j=0;j<scores[i].length;j++){
                sum+=scores[i][j];
            }
            System.out.println("这个班的总成绩是："+sum);
        }
    }
}
